﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ITAP.ContourBuilder.Constraints;

namespace ITAP.ContourBuilder.Components.Constraints
{
    [Serializable]
    public abstract class Constraint : IContourConstraint
    {
        public Constraint()
        {
        }

        #region IContourConstraint Members

        public virtual bool Check(IContourComponent component)
        {
            return false;
        }

        public virtual void Fix(IContourComponent component)
        {
        }

        protected bool enabled = true;
        public virtual bool Enabled
        {
            get
            {
                return enabled;
            }
            set
            {
                enabled = value;
            }
        }

        #endregion
    }
}
